package com.mall.hadoop.job.diffpeople;

import java.io.IOException;

import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

/**
 * 全国人数类型统计map
 * @ClassName: DiffPeopleMap
 * @Description: 
 * @author:wangwenyue wangwenyue@ide365.com
 * @date 2016年7月15日 下午2:51:27
 */
public class DiffPeopleMap extends Mapper<LongWritable, Text, Text, IntWritable>{
	@Override
	protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
		String str = value.toString();
		String[] split = str.split(",");
		for (String string : split) {
			  context.write(new Text(string),new IntWritable(1));
		}
	}
}
